#include <stdio.h>
#include <stdlib.h>
#include "lista.h"
#include "exercicio.h"

int showMenu(void);

int main(int argc, char *argv[])
{
    int opc;
    listaElemento l;
    criaLista( &l );
    
    do {
        opc = showMenu();
        
        switch ( opc ) {
            case 1: exibirLista(&l); break;
            case 2: printf("2"); break;
            case 3: printf("3"); break;
            case 4: printf("4"); break;
            case 5: printf("5"); break;
            case 6: printf("6"); break;
            case 7: printf("\t\t\t...FIM...\n\n"); break;        
        }
    } while (opc != 7);
        
    system("PAUSE");
    return 0;
}

int showMenu(void)
{
    system("CLS");
    int r;
    printf("\n\n\tMENU PRINCIPAL\n");
    printf(" 1 - exibir lista\n 2 - inserir\n 3 - remover\n 4 - exibir elemento\n");
    printf(" 5 - exibir posicao\n 6 - esvaziar \n 7 - sair \n\n");
    scanf("%d", &r);
    return r;
}
